<template>
  <div>
    <div class="quanshang"></div>
    <div class="jing" @click="$router.push('/handpic')">
      <span>精选专题</span>
      <van-icon name="arrow"></van-icon>
    </div>
    <div class="hand">
      <ul>
        <li v-for="(item,index) in handList" :key="index"  @click="$router.push('/wenzhan/'+item.id)">
          <img :src="item.pic" alt="">
          <p class="p1">{{ item.title }}</p>
          <p class="p2"> {{ item.descript }} </p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
        handList:[]
    };
  },
  created() {},
  mounted() {
      this.hand()
  },
  methods: {
    hand() {
      this.$axios
        .get("https://api.it120.cc/small4/cms/news/list")
        .then((res) => {
            this.handList = res.data
            // console.log(res)
        });
    },
  },
};
</script>

<style scoped lang="less">
.quanshang {
  width: 100%;
  height: 0.2rem;
  background-color: #f4f4f4;
  margin-top: 0.1rem;
}
.jing {
  width: 100%;
  line-height: 0.93rem;
  text-align: center;
  font-size: 0.3rem;
}
.hand {
  width: 100%;
  height: 5.44rem;
  overflow: auto;
  ul {
    width: 32rem;
    display: flex;
    li {
      width: 6.36rem;
      height: 4.1rem;
      margin-left: 0.2rem;
      img {
        width: 6.36rem;
        height: 4.1rem;
        display: block;
      }
      p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
         .p1{
        font-size: 0.24rem;
        color: #2c2c2c;
        margin-top: 0.2rem;
        margin-bottom: 0.28rem;
      }
      .p2 {
        font-size: 0.2rem;
        color: #a8a8a8;
      }
    }
  }
}
</style>
